
<?php
$str='<a href="sina.com.cn">bbbbbbbbb</a>';
$a=preg_replace("/(<a.*?)(.*)?(<\/a>)/i",'$1<span class="link">$2</span>$3',$str);
//echo $a;

$bodytag = '<meta http-equiv="Content-Type" content="text/html; charset=GBK" />';
$reg='/<meta(\s)+http-equiv="Content-Type"(\s)+content="text\/html;(\s)+charset=(.)+"(\s)+\/{0,1}>/i';
$replacement='<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
$b=preg_replace($reg,$replacement,$bodytag);
echo $b;



?>


